import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '../views/index.vue'

const routes=[{
    name:'index',
    path:'/',
    component:Index,
    children:[
        {
            path:'',
            name:'get',
            component:()=> import('../components/get.vue')
        },
        {
            path:'set',
            name:'set',
            component:()=> import('../components/set.vue')
        }
    ]
}]
const router=createRouter({
    history:createWebHashHistory(),
    scrollBehavior(to,from,savedPosition){
        return {top:0}
    },
    routes
})

export default router